< previous page page_7 next page >

Page 7
To select the Titles table from this list, simply click on it. Visual Basic automatically inserts the table name into the RecordSource property in the Properties window.
Setting the Caption and Name Properties
You need to set two other data control properties in the project. These two properties are not required, but setting them is a good programming practice because it improves the readability of the programming code. Here are the optional properties:
Caption
Displayed name of the data control
Name
Program name of the data control

Setting the Caption property of the data control sets the text that displays between the record selection arrows on the data control. (Please note that you will need to expand the width of the data control to read this text.) It is a good habit to set this to a value that makes sense to the user.
Setting the Name property of the data control sets the text that will be used by the Visual Basic programmer. This is never seen by the user, but you should set the Name to something similar to the Caption to make it easier to relate the two when working on your program.
For your program, set the Caption property of the data control to Titles and the Name property of the data control to datTitles. Now that you've added the Caption property, use the mouse to stretch the data control so that you can see the complete caption. Your form should look like the one in Figure 1.4.
0007-01.jpg
Figure 1.4.
A data control stretched to
show the Caption property.
Note.gif
The name of the data control (datTitles) might seem unusual. It is, however, a logical name if you remove the first three letters, dat. This prefix is added to designate this object as a data control. The

 
< previous page page_7 next page >

If you like this book, buy it!